test(conformance): add 22-case gateway conformance test suite - #209
Merged
Merged
Conversation
Adds tests/conformance/test_gateway_conformance.py with all 22 cases
from the GTC Berlin demo spec: MCP protocol (8), TRACE Claim (5), policy
enforcement (5), and session management (4). Also adds
POST /sessions/{id}/reset to MCPServer with 501/404/200 behaviour to
satisfy the session reset conformance group.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
imran-siddique
force-pushed
the
feat/conformance-test-runner
branch
from
June 6, 2026 21:41
b02580e to
2cf9c87
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
22-case conformance test suite validating cMCP gateway protocol compliance. Tests run against an in-process Starlette
TestClientfixture with minimal mock dependencies.MCP Protocol (8 tests): health, initialize, tools/list GET, tools/call allow/deny/unknown, parse error, method-not-found, tools/list via MCP method
TRACE Claim (5 tests): trace-claim 404, trace-claim 501 (no session manager), audit-export 501, audit-export missing ?session_id → 400, session-reset 501
Policy enforcement (5 tests): allowed result with _cmcp metadata, denied → 403 + POLICY_DENY code, call_id is UUID, audit_entry_hash present, deny message non-empty
Session management (4 tests): reset returns old/new IDs, wrong ID → 404, reset clears attestation_stale, health exempt from bearer auth
Closes #75
🤖 Generated with Claude Code